import { Body, Controller, Post } from '@nestjs/common';
import { SmsService } from './sms.service';
import { SendSmsDto } from './dto/send-sms.dto';
import { Public } from '../public/public.decorator';

@Controller('sms')
export class SmsController {
  constructor(private readonly smsService: SmsService) {}

  /**
   * 发送短信验证码
   * @param sendSmsDto
   */
  @Public()
  @Post('send')
  send(@Body() sendSmsDto: SendSmsDto) {
    return this.smsService.send(sendSmsDto);
  }
}
